<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="common/taglibs.jsp" %>
<c:set var="ctx" value="<%=request.getContextPath()%>" />
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CodingDemo</title>
</head>
<body>
    <h1>Hello,welcome to CodingDemo of Puresource!</h1>
    <a onclick="test()">数据库测试</a>

    <script src="${ctx}/resources/js/jquery-2.2.3.min.js"></script>
    <script type="text/javascript">
        function test() {
            $.ajax({
                url : "${ctx}/test.do",
                data : {},
                type : "post",
                success : function(result) {
                    alert("aa");
                }
            })
        }
    </script>
</body>
</html>